<%@ page language="java" import="java.util.*,cn.sypt.yuhao.domain.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/admin/";

ArrayList al=(ArrayList)request.getAttribute("users");

%>



<!DOCTYPE HTML>
<html lang="en-US">
<head>
<base href="<%=basePath%>">
<title>后台管理系统</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- The Main CSS File -->
	<link rel="stylesheet" href="CSS/style.css">
	<!-- jQuery -->
	<script src="Javascript/jQuery/jquery-1.7.2.min.js"></script>
	<!-- Flot -->
	<script src="Javascript/Flot/jquery.flot.js"></script>
	<script src="Javascript/Flot/jquery.flot.resize.js"></script>
	<script src="Javascript/Flot/jquery.flot.pie.js"></script>
	<!-- DataTables -->
	<script src="Javascript/DataTables/jquery.dataTables.min.js"></script>
	<!-- ColResizable -->
	<script src="Javascript/ColResizable/colResizable-1.3.js"></script>
	<!-- jQuryUI -->
	<script src="Javascript/jQueryUI/jquery-ui-1.8.21.min.js"></script>
	<!-- Uniform -->
	<script src="Javascript/Uniform/jquery.uniform.js"></script>
	<!-- Tipsy -->
	<script src="Javascript/Tipsy/jquery.tipsy.js"></script>
	<!-- Elastic -->
	<script src="Javascript/Elastic/jquery.elastic.js"></script>
	<!-- ColorPicker -->
	<script src="Javascript/ColorPicker/colorpicker.js"></script>
	<!-- SuperTextarea -->
	<script src="Javascript/SuperTextarea/jquery.supertextarea.min.js"></script>
	<!-- UISpinner -->
	<script src="Javascript/UISpinner/ui.spinner.js"></script>
	<!-- MaskedInput -->
	<script src="Javascript/MaskedInput/jquery.maskedinput-1.3.js"></script>
	<!-- ClEditor -->
	<script src="Javascript/ClEditor/jquery.cleditor.js"></script>
	<!-- Full Calendar -->
	<script src="Javascript/FullCalendar/fullcalendar.js"></script>
	<!-- Color Box -->
	<script src="Javascript/ColorBox/jquery.colorbox.js"></script>
	<!-- Kanrisha Script -->
	<script src="Javascript/kanrisha.js"></script>
</head>
<body>
	
<%@include file="/admin/head.jsp" %>
	<div class="wrapper contents_wrapper">
		<%@include file="/admin/left.jsp" %>
		
		<div class="contents">
			<div class="grid_wrapper">

				<div class="g_6 contents_header">
					<h3 class="i_16_message tab_label">用户管理</h3>
				</div>
				
				<div class="g_12">
					<div class="widget_header">
						<h4 class="widget_header_title  ">用户管理</h4>
					</div>
					<div class="widget_contents noPadding twCheckbox">
						<table class="tables datatable noObOLine">
							<thead>
								<tr>
									
									<th>用户名</th>
									<th>邮箱</th>
									<th>电话号码</th>
									<th>注册时间</th>
									<th>激活状态</th>
									<th>权限管理</th>
									<th>删除</th>
								</tr>
							</thead>
							<tbody>
							<% 
							for(int i=0;i<al.size();i++)
							{
							User user=(User)al.get(i);
							
							%>
								<tr class="status_open">
									<td><%=user.getUname() %></td>
									<td><%=user.getUemail() %></td>
									<td><%=user.getUphone() %></td>
									<td><%=user.getUtime() %></td>
									<%
									if(user.getLevel()==0)
									{
									 %>
									<td>未激活</td>
									<%									
									}else
									{									
									 %>
									 <td>已激活</td>
									 <% 
									 }
									 %>
									<td><a href=/sypt/ManagerServlet?flag=usergl&flag1=sj&uid=<%=user.getUid() %>>升级</a>/<a href=/sypt/ManagerServlet?flag=usergl&flag1=jj&uid=<%=user.getUid() %>>降级</a></td>
									<td><a href=/sypt/ManagerServlet?flag=usergl&flag1=dl&uid=<%=user.getUid() %>>删除</a></td>
								</tr>
								
								<%
								
								}
								 %>
								
							</tbody>
						</table>
					</div>
				</div>
				<div class="g_12 separator"><span></span></div>
				<!-- Chats -->
				
				
			</div>		
		</div>
	</div>
	<jsp:include flush="true" page="foot.jsp"></jsp:include>
</body>
</html>